package com.mdd.common.enums;

import com.google.common.collect.Maps;

import java.util.Map;

public enum OrderPlayTypeEnum {
    //支付方式:1-微信支付;2-支付宝支付;3-余额支付;
    NO_PAY(0, "-"),
    WECHAT_PAY(1, "微信支付"),
    BALANCE_PAY(2, "余额支付"),
    ALI_PAY(3, "支付宝支付"),
    H5WECHAT_PAY(4, "H5微信支付");

    private final int type;
    private final String desc;

    OrderPlayTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    /**
     * 获取状态码
     *
     * @return Long
     * @author fzr
     */
    public int getType() {
        return this.type;
    }

    /**
     * 获取提示
     *
     * @return String
     * @author fzr
     */
    public String getDesc() {
        return this.desc;
    }

    public static Map<Integer, String> getMap() {
        Map<Integer, String> map = Maps.newHashMap();
        for (OrderPlayTypeEnum codeEnum : OrderPlayTypeEnum.values()) {
            map.put(codeEnum.type, codeEnum.desc);
        }
        return map;
    }
}
